<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>流程列表</title>
    <link th:replace="common/header"/>
    <link rel="stylesheet" th:href="@{/css/tip.css}"/>
    <script type="text/javascript" th:src="@{/js/layer/tip.js}"></script>
</head>
<body class="no-skin">
<div th:replace="common/top"></div>
<div class="main-container ace-save-state" id="main-container">
    <div th:replace="common/menu"></div>
    <div class="main-content">
        <div class="main-content-inner">
            <div th:replace="common/title"></div>
            <div class="page-content">
                <div th:replace="common/skin"></div>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <h3 class="header smaller lighter blue"><i class="fa fa-list" aria-hidden="true"></i>流程管理列表</h3>
                        <form id="form" name="form" th:action="@{/templates/activiti/getAll}" th:method="post"
                              th:object="${actForm}">
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                    <a class="btn btn-info" shiro:hasPermission="/activiti/add"
                                       th:href="@{/activiti/add}"><i class="fa fa-plus"
                                                                        aria-hidden="true"></i>新建流程</a>
                                    <a class="btn btn-success" shiro:hasPermission="/activiti/upload"
                                       th:href="@{/activiti/upload}"><i class="fa fa-arrow-circle-up"
                                                                     aria-hidden="true"></i>导入流程</a>
                                    <a class="btn btn-danger" shiro:hasPermission="/activiti/oneDelete"
                                       th:href="@{/activiti/oneDelete}"><i class="fa fa-delicious"
                                                                        aria-hidden="true"></i>一键删除</a>
                                    <button type="button" shiro:hasPermission="/activiti/deleteAll"
                                            class="btn btn-danger"
                                            th:onclick="'deleteAll(\'/activiti/deleteAll\');'"><i
                                            class="fa fa-times" aria-hidden="true"></i>批量删除
                                    </button>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span3">
                                            <span class="input_text">标题:</span>
                                        </div>
                                        <div class="span9">
                                            <input type="text" name="title" id="title" class="input_fix"
                                                   placeholder="请输入标题" th:value="*{title}" maxlength="50"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span4">
                                            <span class="input_text">Key:</span>
                                        </div>
                                        <div class="span8">
                                            <input type="text" name="key" id="key" class="input_fix"
                                                   placeholder="请输入Key" th:value="*{key}" maxlength="50"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <button class="btn btn-info" style="float: right;" type="button"
                                            onclick="pagechange(1);"><i class="fa fa-search"
                                                                        aria-hidden="true"></i>查询
                                    </button>
                                </div>
                            </div>
                            <table class="table">
                                <thead>
                                <tr>
                                    <td>主键</td>
                                    <td>名称</td>
                                    <td>Key</td>
                                    <td>部署主键</td>
                                    <td class="hidden-480">版本</td>
                                    <td>操作</td>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="act: ${pi.records}">
                                    <td th:text="${act.id}"></td>
                                    <td th:text="${act.name}"></td>
                                    <td th:text="${act.key}">doudou</td>
                                    <td th:text="${act.deploymentId}"></td>
                                    <td class="hidden-480" th:text="${act.version}">doudou</td>
                                    <td>
                                        <a href="#" shiro:hasPermission="/activiti/view"
                                           class="btn btn-primary btn-minier"
                                           th:href="@{'/activiti/view?instanceId=' + ${act.id}}" th:text="查看详情">查看详情</a>
                                        <a href="#" shiro:hasPermission="/activiti/create"
                                           class="btn btn-primary btn-minier"
                                           th:href="@{'/leaveInfo/add?key=' + ${act.key}}" th:text="快速新建">快速新建</a>
                                        <a href="#" shiro:hasPermission="/activiti/delete"
                                           class="btn btn-primary btn-minier"
                                           th:href="@{'/activiti/delete?id=' + ${act.deploymentId}}" th:text="删除">删除</a>
                                    </td>
                                </tr>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <td colspan="6">
                                        <div class="row-fluid" th:replace="common/page"></div>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <div th:replace="common/footer"></div>
</div><!-- /.main-container -->
<div th:replace="common/buttom"></div>
<div th:replace="common/layer"></div>
</body>
</html>
